package com.cctc.factory;

import com.cctc.dao.PurchaseDetailDao;
import com.cctc.dao.WareOrderTaskDao;
import com.cctc.dao.WareOrderTaskDetailDao;
import com.cctc.dao.impl.PurchaseDetailDaoImpl;
import com.cctc.dao.impl.WareInfoDaoImpl;
import com.cctc.dao.impl.WareOrderTaskDaoImpl;
import com.cctc.dao.impl.WareOrderTaskDetailDaoImpl;
import com.cctc.service.WareOrderTaskService;
import com.cctc.service.impl.WareOrderTaskServiceImpl;

/**
 * @Name PrototypeBeanFactory
 * @Description: 实例 Bean 工厂
 * @Author: lichao
 * @Email: li2chao@126.com
 * @Date: 2024-01-13 12:38:45
 **/
public class PrototypeBeanFactory {

    /**
     * 使用实例工厂方法创建 Bean 对象
     *
     * @return com.cctc.dao.PurchaseDetailDao
     * @author lichao
     * @email li2chao@126.com
     * @date 2024/01/13 12:47:58
     */
    public PurchaseDetailDao createPurchaseDetailDaoInstance() {
        return new PurchaseDetailDaoImpl();
    }

    /**
     * 使用实例工厂方法创建 Bean 对象，并注入依赖实例
     * @param wareOrderTaskDao
     * @param wareOrderTaskDetailDao
     * @return com.cctc.service.WareOrderTaskService
     * @author lichao
     * @email li2chao@126.com
     * @date 2024/01/14 11:43:20
     */
    public WareOrderTaskService createWareOrderTaskServiceInstance(WareOrderTaskDao wareOrderTaskDao, WareOrderTaskDetailDao wareOrderTaskDetailDao) {
        return new WareOrderTaskServiceImpl(wareOrderTaskDao, wareOrderTaskDetailDao);
    }

}

